//
//  BREmptyView.m
//  BrezzeSaaS
//
//  Created by IOS on 2021/11/18.
//  Copyright © 2021 Brezze GWG. All rights reserved.
//

#import "BREmptyView.h"

@implementation BREmptyView


- (instancetype)initEmptyViw {
    
    return [self initEmptyViw:@"error_empty" title:Localized(@"home_noRecord")] ;
}

- (instancetype)initEmptyViw:(NSString *)imgStr title:(NSString *)title {
    
    BREmptyView *empty = [BREmptyView emptyViewWithImage:UIImageMake(imgStr) titleStr:title detailStr:@""];
    
    return empty;
}

- (instancetype)initErrorViw {
    
    return [self initErrorViw:@"error_netError" title:Localized(@"error_notNet")];
}

- (instancetype)initErrorViw:(NSString *)imgStr title:(NSString *)title {
    
    BREmptyView *empty = [BREmptyView emptyViewWithImage:UIImageMake(imgStr) titleStr:@"" detailStr:title];
    
    return empty;
}

- (void)prepare {
    [super prepare];
//    self.subViewMargin = 0;
    self.titleLabMargin = 0;
    self.contentViewY = 64;
    self.imageSize = CGSizeMake(128, 128);
    self.titleLabFont = [UIFont fontB:17];
    self.titleLabTextColor = UIColor.qd_emptyTextColor;
    self.detailLabMaxLines = 5;
    self.detailLabFont = [UIFont fontB:17];
    self.detailLabTextColor = UIColor.qd_emptyTextColor;
//    self.title
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end

